home *** CD-ROM | disk | FTP | other *** search
/ The Sunday Times: The Month 2004 August / The Sunday Times - The Month 2004-08.iso / pc / engine / shell / shell.swf / scripts / DefineSprite_86 / frame_1 / DoAction_2.as next >
Encoding:
Text File  |  2004-07-06  |  1.2 KB  |  36 lines

  1. var tl = this;
  2. showButton = function(overlayObj)
  3. {
  4.    var waitIntID;
  5.    gotoButtonState(1);
  6.    if(overlayObj.showDelay != 0)
  7.    {
  8.       if(overlayObj.delayFirstViewOnly != true)
  9.       {
  10.          if(overlayObj.showDelay > 0)
  11.          {
  12.             trace("wait to show the delay (" + overlayObj.showDelay + ") - do this every time");
  13.             waitIntID = setInterval(gotoButtonState,overlayObj.showDelay * 1000,overlayObj.button);
  14.             Tardis.OverlayController.setObjProperty("buttonShowIntID",waitIntID);
  15.          }
  16.          return undefined;
  17.       }
  18.       if(Tardis.UsageData.FirstTime == true)
  19.       {
  20.          if(overlayObj.showDelay > 0)
  21.          {
  22.             trace("wait to show the delay (" + overlayObj.showDelay + ") - do this first time only");
  23.             waitIntID = setInterval(gotoButtonState,overlayObj.showDelay * 1000,overlayObj.button);
  24.             Tardis.OverlayController.setObjProperty("buttonShowIntID",waitIntID);
  25.          }
  26.          return undefined;
  27.       }
  28.    }
  29.    gotoButtonState(overlayObj.button);
  30. };
  31. gotoButtonState = function(btn)
  32. {
  33.    Tardis.OverlayController.clearSkipOrEnterIntID();
  34.    tl.gotoAndStop(btn);
  35. };
  36.